import request from '../utils/request'

export default {
  login(param){
    return request({
      url: '/users/login',
      // url: '/238527239',
      method: 'post',
      data: param,
      // mock: true
    })
  },
  noticeCount() {
    return request({
      url: '/leave/count',
      method: 'get',
      // mock: true,
      data: {}
    })
  },
  menuList(data) {
    return request({
      url: '/menu/list',
      method: 'get',
      data: {},
    })
  },
  userList(param) {
    return request({
      url: '/users/list',
      method: 'get',
      // mock: true,
      data: param
    })
  },
  userDelete(param) {
    return request({
      url: '/users/delete',
      method: 'post',
      // mock: true,
      data: param
    })
  },
  getRoleAllList() {
    return request({
      url: '/roles/allList',
      method: 'get',
      // mock: true,
      data: {}
    })
  },
  getRoleList(params) {
    return request({
      url: '/roles/List',
      method: 'get',
      // mock: true,
      data: params
    })
  },
  userSubmit(params) {
    return request({
      url: '/users/operate',
      method: 'post',
      // mock: true,
      data: params
    })
  },
  menuSubmit(params) {
    return request({
      url: '/menu/operate',
      method: 'post',
      // mock: true,
      data: params
    })
  },
  roleList(params) {
    return request({
      url: '/roles/list',
      method: 'get',
      // mock: true,
      data: params
    })
  },
  roleSubmit(params) {
    return request({
      url: '/roles/operate',
      method: 'post',
      data: params,
    })
  },
  updatePermission(params) {
    return request({
      url: '/roles/update/permission',
      method: 'post',
      data: params,
    })
  },
  getDeptList(params) {
    return request({
      url: '/dept/list',
      method: 'get',
      data: params
    })
  },
  deptOperate(params) {
    return request({
      url: '/dept/operate',
      method: 'post',
      data: params
    })
  },
  userAllList() {
    return request({
      url: '/users/all/list',
      method: 'get'
    })
  },
  deptOperate(params) {
    return request({
      url: '/dept/operate',
      method: 'post',
      data: params
    })
  },
  permissionList() {
    return request({
      url: '/users/getPremissionList',
      method: 'get',
      data: {}
    })
  },
  // 审批列表
  getApplyList(params) {
    return request({
      url: '/leave/list',
      method: 'get',
      data: params
    })
  },
  leaveOperate(params) {
    return request({
      url: '/leave/operate',
      method: 'post',
      data: params
    })
  },
  leaveApprove(params) {
    return request({
      url: '/leave/approve',
      method: 'post',
      data: params
    })
  }
}